requireUIFile("jquery-ui-nestedsortable.js"); $GLOBALS["AF"]->requireUIFile("EditNav.js"); # get plugin $SecondaryNavPlugin = $GLOBALS["G_PluginManager"]->getPluginForCurrentPage(); # get tree $ToPrint = $SecondaryNavPlugin->getTree($NavMenu); # print all NavItems using the tree print "
"; printItems($ToPrint); print "
"; # output the javascript to wire-in the jquery-ui-nestedsortable print "
"; } /** * Print items in an unordered list for nestedsortable sorting * @param array $Items to print, in tree structure */ function printItems(array $Items) { print "

"; foreach ($Items as $Info) { print "
- ". "
  ".htmlspecialchars($Info["Label"]). "
  ".getItemButtons($Info["Id"])."
  ". "
"; } print "

"; } /** * Get the rename and delete buttons for nav items * put here so printItems() isn't too cluttered (and copying format of MFO) * @param int $NavItemId ID of NavItem to print buttons for * @return string html buttons to print */ function getItemButtons(int $NavItemId) { return "". "". "edit ". "
"; } /** * Print the list of offered items * @param array $OfferedItems label/link pairs to display (keyed on link) */ function printOfferedItems(array $OfferedItems) { $TooltipId = 0; print "

"; foreach ($OfferedItems as $Link => $Item) { ob_start(); ApplicationFramework::getInstance()->getInterfaceSetting("TooltipsUseDialogs") ? FormUI::displayDialogHelp($Item["Label"], $Item["Description"], $TooltipId++) : FormUI::displayHoverHelp($Item["Description"]); $Description = ob_get_clean(); $UrlLink = urlencode($Link); print "
- ".$Description. "".$Item["Label"]. "
  ". "
"; } print "

"; } # ----- MAIN ----------------------------------------------------------------- PageTitle("Edit Your Menu"); $GLOBALS["AF"]->requireUIFile("jquery-ui.js"); $GLOBALS["AF"]->requireUIFile("jquery-ui.css"); ?>
Tip: drag objects to reorder them.

".$Error.""; } ?>

Changes to menu order saved

## Edit Your Menu

## Available Menu Items

## Add Item Manually

Label: Link: